package cn.net.yto.school.dao.entities;

import cn.net.yto.base.dao.entities.TAccount;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * tb_course 实体类
 * Created by gaojing
 * Wed Jul 18 20:11:47 CST 2018
 */
@Entity
@Table(name = "tb_course")
@Data
@NoArgsConstructor
public class TbCourse implements Serializable {
    private static final long serialVersionUID = -2664711914738365917L;
    /**
     * 课程id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "c_id", nullable = false, length = 11)
    private Integer id;

    /**
     * 课程名
     */
    @Column(name = "c_name", nullable = false, length = 32)
    private String courseName;

    /**
     * 课程内容
     */
    @Column(name = "c_content", nullable = false, length = 1024)
    private String courseContent;

    /**
     * 课程课时
     */
    @Column(name = "c_hour", nullable = false, length = 10)
    private String courseHour;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Timestamp createTime;

    /**
     * 修改时间
     */
    @Column(name = "update_time")
    private Timestamp updateTime;

    /**
     * 操作员
     */
    @ManyToOne
    @JoinColumn(name = "actor", referencedColumnName = "ACCT_ID")
    private TAccount actor;

}

